<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="icon" href="favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>课间提示</title>
    <style>
        .waves.waves-blue .waves-animation{
            background:rgba(0,0,255,0.4);
        }
        body{user-select: none;}
        .waves{
            position:relative;
            cursor:pointer;
            display:inline-block;
            overflow:hidden;
            text-align: center;
            -webkit-tap-highlight-color:transparent;
            z-index:1;
        }
        .waves .waves-animation{
            position:absolute;
            border-radius:50%;
            width:25px;
            height:25px;
            opacity:0;
            background:rgba(255,255,255,0.4);
            transition:all 0.7s ease-out;
            transition-property:transform, opacity, -webkit-transform;
            -webkit-transform:scale(0);
            transform:scale(0);
            pointer-events:none
        }
        .bbtn{
            width: 80px;
            height: 40px;
            line-height: 40px;
            background: #fff;
            color: #666;
            border-radius: 5px;
            border: 0;
            box-shadow: 0 0 5px #666;
            background-color: #eee;
        }

        input{
            outline: none;
            width: 100px;
            height: 40px;
            padding: 0;
            border: 0;
            text-indent: 10px;
            margin-right: 10px;
        }
        .form{
            display: flex;
            position: fixed;
            left: 20px;
            bottom: 20px;
        }
        .box{
            position: fixed;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            text-align: center;
        }
        p{
            font-size:60px;
            text-shadow: -1px -1px 2px #000,1px 1px 2px #aaa;
            color:#eee;
            letter-spacing: 8px;
            font-weight: 700;
        }
        body{
            background-color: #eee;
        }

        #mtime{
            color:skyblue;
        }

        .logo{
            position: fixed;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-250px);
        }


        @media (max-width: 992px){
            p{font-size:35px}
        }
        @media (max-width: 768px){
            p{font-size:30px}
        }

        @media (max-width: 378px){
            p{font-size:25px}
        }
    </style>
</head>
<body>
<div class="logo">
    <img src="https://www.wolfcode.cn/assets/website/home/img/top-nav/logo.png" alt="">
</div>
<div class="box">
    <p>现在是休息时间</p>
    <p><span id="mtime">9:50 </span> 继续回来上课！</p>
</div>
<div class="form">
    <input type="text" id="mipt">
    <a class="bbtn waves waves-blue" id="ma">set</a>
</div>
<script>
    function changeTime(){
        if(!(mipt.value.includes(":")||mipt.value.includes("："))){
            alert("请输入正确的时间格式！");
            return;
        }
        mtime.innerHTML = mipt.value;
        mtime.color="skyblue";
        mipt.value="";
    }

    ma.onclick = changeTime;
    mipt.onkeyup = function(e){
        if(e.keyCode===13){
            changeTime();
        }
    }

    // 快捷键限制
    document.onkeydown = function() {
        var e = window.event || arguments[0];
        //屏蔽F12
        if(e.keyCode == 123) {
            return false;
            //屏蔽Ctrl+Shift+I
        } else if((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
            return false;
            //屏蔽Shift+F10
        } else if((e.shiftKey) && (e.keyCode == 121)){
            return false;
            //屏蔽Ctrl+S
        } else if(event.ctrlKey  &&  window.event.keyCode==83 ){
            return false;
        }
    };
    document.oncontextmenu = function() {
        return false;
    }
</script>
</body>
</html>